//
//  VCOfSecond.m
//  09--Homework2
//
//  Created by 冀永金 on 16/7/26.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "VCOfSecond.h"

@interface VCOfSecond ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, retain) UITableView *tableView;
@end

@implementation VCOfSecond

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tableView = [[UITableView alloc]initWithFrame:self.view.bounds style:UITableViewStylePlain];
    [self.view addSubview:self.tableView];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    //NSLog(@"%@",self.arr);
    // Do any additional setup after loading the view.
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.arr.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"pool"];
    if (cell == nil) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"pool"];
    }
    NSArray *arr = [self.arr[indexPath.row] objectForKey:@"areaArr"];
    NSString *str = arr[indexPath.row];
    NSArray *arr1 = [str componentsSeparatedByString:@" "];
    
    cell.textLabel.text = arr1[4];
    cell.detailTextLabel.text = [arr1 lastObject];
       return cell;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
